import java.io.IOException;

//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
    private static final String AES_KEY = "0123456789abcdef"; // 128-bit key

    public static void main(String[] args) {
        try {
            ImageEncryptor.encryptImage("src/image/cat.jpg", "src/image/cate_123456.jpg");
//            ImageEncryptor.decryptImage("src/image/cate1.jpg", "src/image/catd.jpg");

//            AESEncryptor.encryptImage("src/image/cat1.png", "src/image/cate_aes.png");
//            AESEncryptor.decryptImage("src/image/cate_aes.jpg", "src/image/catd_aes1.jpg");

//            String base64String = ImageString.getImageBinary("src/image/cat1.png"); // 图像转为Base64字符串
//            String encryptedString=AESEncryptor.AES128Encrypt(base64String, AES_KEY);
//            String decryptedString=AESEncryptor.AES128Decrypt(encryptedString, AES_KEY);
//            ImageString.base64StringToImage(decryptedString,"src/image/catout_AESDecrypted.png"); // Base64字符串转为图像

//            AESEncryptor.generateSnowflake("src/image/cat1.png","src/image/catout_snowflake.png");

            //1
            //4
        } catch (IOException e) {
            e.printStackTrace();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

    }
}

